#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>

using namespace std;

#if _DEBUG
	#pragma comment( lib, "sfml-system-s-d.lib" )
	//#pragma comment( lib, "sfml-graphics-s-d.lib" )
	//#pragma comment( lib, "sfml-audio-s-d.lib" )
	#pragma comment( lib, "sfml-Window-s-d.lib" )
#else
	#pragma comment( lib, "sfml-system-s.lib" )
#endif


 int main()
 {

	 sf::Clock clock;

	 
	 unsigned int VideoModesCount = sf::VideoMode::GetModesCount();
	 for (unsigned int i=0; i < VideoModesCount; i++)
	 {
		 sf::VideoMode Mode = sf::VideoMode::GetMode(i);
		 cout << Mode.Width << "x" << Mode.Height << "x" << Mode.BitsPerPixel <<endl;
	 }

	 sf::Window App(sf::VideoMode(800,600), "SFML Window" );
	 const sf::Input& Input = App.GetInput();
	 bool Running = true;
	 while (Running)
	 {

		 sf::Event Event;
		 while (App.GetEvent(Event))
		 {
			 if (Event.Type == sf::Event::Closed)
				 Running = false;

			 if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
				 Running = false;
			 
		 }

		 if ( Input.IsKeyDown(sf::Key::Left))
			{
				cout << "down";
			}

		 cout << clock.GetElapsedTime() <<endl;
		 clock.Reset();
		 
		 App.Display();
	 }

	 return EXIT_SUCCESS;
	
 }

